package com.xxx.shetuan3.dao;

import com.xxx.shetuan3.pojo.Activity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface ActivityDao {
    @Insert("insert into activity (activity_name,start,end,organization_id" +
            "values(#{activityName},#{start},#{end},#{organizationId})"
    )
    public boolean saveActivity(Activity activity);

    @Select("select * from activity where activity_id = #{activityID}")
    public Activity queryActivityById(int activityID);

}
